package P2分治回溯;

public class RecursionDemo04 {
    public static void main(String[] args) {
        int num = fibo(100);
        System.out.println(num);
    }

    private static int[] dp = new int[101];

    private static int fibo(int n) {
        if (n == 1 || n == 2) {
            return 1;
        }
        if (dp[n] == 0) {
            dp[n] = fibo(n - 1) + fibo(n - 2);
        }
        return dp[n];
    }
}